import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'mobile/screens/m_home_screen.dart';
import 'windows/screens/w_home_screen.dart';

void main() {
  // 加入windowManager
  WidgetsFlutterBinding.ensureInitialized();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '智象引擎windows',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home:
          kIsWeb
              ? const Text('Web platform is not supported in this project.')
              : defaultTargetPlatform == TargetPlatform.windows
              ? const WindowsHomeScreen()
              : const MobileHomeScreen(),
    );
  }
}

// class MyApp extends StatelessWidget {
//   const MyApp({super.key});

//   @override
//   Widget build(BuildContext context) {
//     return MaterialApp(
//       title: '智象引擎',
//       theme: ThemeData(
//         colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
//       ),
//       home: const MyHomePage(title: 'Flutter Demo Home Page'),
//     );
//   }
// }
